const path = require('path')

const resolve = dir => {
  return path.join(__dirname, dir)
}

const BASE_URL = process.env.NODE_ENV === 'production' ? './' : '/'

module.exports = {
  publicPath: BASE_URL,//公共文件路径
  lintOnSave: true, //保存文件时对代码进行格式校验
  chainWebpack: config => {
    config.resolve.alias.set('@', resolve('src'))
  }
}
